<ul class="breadcrumb">
  <li><a href="/">首页</a> <span class="divider">/</span></li>
  <li><a href="/raps">奖惩信息</a> <span class="divider">/</span></li>
  <li class="active">所有奖惩</li>
</ul>
<p>
  <%= link_to '新建奖惩记录', new_rap_path %>
</p>
<script type="text/javascript">
    $(document).ready(function() {
                $("table").tablesorter({
                    sortList: [
                        [3,1]
                    ]  ,
                    headers: { 4: { sorter: false} }
                });
            }
    );
</script>
<table class="zebra-striped bordered-table">
<thead>
  <tr>
    <th>标题</th>
    <th>原因</th>
    <th>相关学生</th>
    <th>发生时间</th>
    <th>操作</th>
  </tr>
</thead>
<tbody>
  <% @raps.each do |rap| %>
      <tr>
        <td><%= rap.title %></td>
        <td><%= rap.reason %></td>
        <td><%= rap.people %></td>
        <td><%= rap.ctime.strftime("%Y-%m-%d %H:%M") %></td>
        <td><%= link_to '查看', rap %>
        <%= link_to '编辑', edit_rap_path(rap) %>
		<%= link_to '删除', rap, confirm: '确认删除?', method: :delete %></td>
      </tr>
  <% end %>
  </tbody>
</table>

<br/>

